/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.camachosanchez.gui;

import com.camachosanchez.bean.ControlCambioNeumatico;
import com.camachosanchez.bean.DetalleControlCambioNeumatico;
import com.camachosanchez.bean.Flotillas;
import com.camachosanchez.bean.MarcasVehiculo;
import com.camachosanchez.bean.TiposVehiculo;
import com.camachosanchez.controler.jdbc.TipoVehiculoJdbcControler;
import com.camachosanchez.controler.jpa.FlotillasJpaController;
import com.camachosanchez.controler.jpa.MarcasVehiculoJpaController;
import com.camachosanchez.reportes.bean.NeumaticosPorUnidad;
import com.camachosanchez.reportes.bean.NeumaticosPorUnidadDetalle;
import com.camachosanchez.util.GUIUtil;
import com.camachosanchez.util.JPAUtil;
import java.awt.Dimension;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Query;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JOptionPane;

/**
 *
 * @author ZULLY
 */
public class DialogoReporteNeumaticosXVehiculo extends javax.swing.JDialog {

    private EntityManagerFactory emf;
    private EntityManager em;
    
    /**
     * Creates new form DialogoReporteNeumaticosXVehiculo
     */
    public DialogoReporteNeumaticosXVehiculo(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();
        GUIUtil.addEscapeKey(this);
        cargarCombos();
        emf = JPAUtil.getEntityManagerFactory();
        em = emf.createEntityManager();
        dateDesde.setDate(new Date());
        dateHasta.setDate(new Date());
        activarControles(false);
        Dimension size = new Dimension(400, 270);
        setSize(size);
        setPreferredSize(size);
        setMinimumSize(size);
        setMaximumSize(size);
        setResizable(false);
        setLocationRelativeTo(null);
        radBtnTodos.requestFocusInWindow();
//        pack();
    }
    
    private void cargarCombos(){
        FlotillasJpaController flotillas_dao = new FlotillasJpaController(null);
        List<Flotillas> flotillas = flotillas_dao.findFlotillasEntities();
        flotillas.add(0, null);
        cmbEmpresa.setModel(new DefaultComboBoxModel(flotillas.toArray()));

        TipoVehiculoJdbcControler tipos_vehiculo_dao = new TipoVehiculoJdbcControler();
        List<TiposVehiculo> tipos_vehiculos = tipos_vehiculo_dao.findAll();
        tipos_vehiculos.add(0, null);
        cmbTipoUnidad.setModel(new DefaultComboBoxModel(tipos_vehiculos.toArray()));
        
        MarcasVehiculoJpaController marcas_vehiculo_dao = new MarcasVehiculoJpaController(null);
        List<MarcasVehiculo> marcas_vehiculos = marcas_vehiculo_dao.findMarcasVehiculoEntities();
        marcas_vehiculos.add(0, null);
        cmbMarcas.setModel(new DefaultComboBoxModel(marcas_vehiculos.toArray()));
    }

    private void activarControles(Boolean activo){
        cmbEmpresa.setEnabled(activo);
        cmbMarcas.setEnabled(activo);
        cmbTipoUnidad.setEnabled(activo);
        checkFechaCompra.setEnabled(activo);
        dateDesde.setEnabled(checkFechaCompra.isSelected() && radBtnEspecifico.isSelected());
        dateHasta.setEnabled(checkFechaCompra.isSelected() && radBtnEspecifico.isSelected());
    }
    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        jToolBar1 = new javax.swing.JToolBar();
        jPanel5 = new javax.swing.JPanel();
        btnImprimir = new javax.swing.JButton();
        jPanel3 = new javax.swing.JPanel();
        radBtnTodos = new javax.swing.JRadioButton();
        radBtnEspecifico = new javax.swing.JRadioButton();
        jPanel1 = new javax.swing.JPanel();
        checkFechaCompra = new javax.swing.JCheckBox();
        jPanel2 = new javax.swing.JPanel();
        jLabel16 = new javax.swing.JLabel();
        cmbEmpresa = new javax.swing.JComboBox();
        jLabel8 = new javax.swing.JLabel();
        cmbTipoUnidad = new javax.swing.JComboBox();
        jLabel9 = new javax.swing.JLabel();
        cmbMarcas = new javax.swing.JComboBox();
        jPanel4 = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        dateDesde = new com.toedter.calendar.JDateChooser();
        jLabel3 = new javax.swing.JLabel();
        dateHasta = new com.toedter.calendar.JDateChooser();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle(".:: Neumáticos por unidad ::.");

        jToolBar1.setFloatable(false);
        jToolBar1.setRollover(true);
        jToolBar1.setMinimumSize(new java.awt.Dimension(73, 30));

        jPanel5.setBackground(new java.awt.Color(255, 255, 255));
        jPanel5.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jPanel5.setPreferredSize(new java.awt.Dimension(69, 28));
        jPanel5.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 2, 2));

        btnImprimir.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/camachosanchez/recursos/pdf.png"))); // NOI18N
        btnImprimir.setText("Imprimir");
        btnImprimir.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        btnImprimir.setContentAreaFilled(false);
        btnImprimir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnImprimirActionPerformed(evt);
            }
        });
        jPanel5.add(btnImprimir);

        jToolBar1.add(jPanel5);

        getContentPane().add(jToolBar1, java.awt.BorderLayout.PAGE_START);

        jPanel3.setBackground(new java.awt.Color(231, 239, 247));
        jPanel3.setPreferredSize(new java.awt.Dimension(407, 24));

        buttonGroup1.add(radBtnTodos);
        radBtnTodos.setSelected(true);
        radBtnTodos.setText("Todas las unidades");
        radBtnTodos.setOpaque(false);
        radBtnTodos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                radBtnTodosActionPerformed(evt);
            }
        });

        buttonGroup1.add(radBtnEspecifico);
        radBtnEspecifico.setText("Filtrar las unidades por:");
        radBtnEspecifico.setOpaque(false);
        radBtnEspecifico.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                radBtnEspecificoActionPerformed(evt);
            }
        });

        jPanel1.setBackground(new java.awt.Color(231, 239, 247));
        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Filtro"));

        checkFechaCompra.setBackground(new java.awt.Color(231, 239, 247));
        checkFechaCompra.setText("Fecha de Compra:");
        checkFechaCompra.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        checkFechaCompra.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
        checkFechaCompra.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                checkFechaCompraActionPerformed(evt);
            }
        });

        jPanel2.setOpaque(false);
        jPanel2.setLayout(new java.awt.GridLayout(3, 2, 3, 3));

        jLabel16.setText("Razón Social:");
        jPanel2.add(jLabel16);

        cmbEmpresa.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        jPanel2.add(cmbEmpresa);

        jLabel8.setText("Tipo de unidad:");
        jPanel2.add(jLabel8);

        cmbTipoUnidad.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        jPanel2.add(cmbTipoUnidad);

        jLabel9.setText("Marca de unidad:");
        jPanel2.add(jLabel9);

        cmbMarcas.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        jPanel2.add(cmbMarcas);

        jPanel4.setOpaque(false);
        jPanel4.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 0, 0));

        jLabel2.setText("Desde:");
        jLabel2.setPreferredSize(new java.awt.Dimension(40, 20));
        jPanel4.add(jLabel2);

        dateDesde.setDateFormatString("dd/MM/yyyy");
        dateDesde.setMaxSelectableDate(new Date());
        dateDesde.setPreferredSize(new java.awt.Dimension(120, 20));
        dateDesde.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                dateDesdePropertyChange(evt);
            }
        });
        jPanel4.add(dateDesde);

        jLabel3.setText("Hasta:");
        jLabel3.setMaximumSize(new java.awt.Dimension(38, 14));
        jLabel3.setMinimumSize(new java.awt.Dimension(38, 14));
        jLabel3.setPreferredSize(new java.awt.Dimension(38, 14));
        jPanel4.add(jLabel3);

        dateHasta.setDateFormatString("dd/MM/yyyy");
        dateHasta.setMaxSelectableDate(new Date());
        dateHasta.setPreferredSize(new java.awt.Dimension(120, 20));
        jPanel4.add(dateHasta);

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(checkFechaCompra, javax.swing.GroupLayout.DEFAULT_SIZE, 345, Short.MAX_VALUE)
                        .addGap(14, 14, 14))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, 349, Short.MAX_VALUE)
                            .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, 349, Short.MAX_VALUE))
                        .addContainerGap())))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, 70, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(checkFechaCompra, javax.swing.GroupLayout.PREFERRED_SIZE, 13, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(11, 11, 11))
        );

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(radBtnEspecifico, javax.swing.GroupLayout.DEFAULT_SIZE, 381, Short.MAX_VALUE)
                    .addComponent(radBtnTodos, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 381, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(radBtnTodos, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(radBtnEspecifico, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        getContentPane().add(jPanel3, java.awt.BorderLayout.CENTER);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private List<ControlCambioNeumatico> getListaNeumaticos(Flotillas flotilla, TiposVehiculo tipoVehiculo, MarcasVehiculo marcaVehiculo, Date fechaDesde, Date fechaHasta){
        List<ControlCambioNeumatico> lista = new ArrayList<ControlCambioNeumatico>();
        List<Integer> idsUnidades;
        java.sql.Date sqlFechaIni, sqlFechaFin;
        String sql = "SELECT V.id FROM Vehiculos V WHERE";
        if(flotilla != null){
            sql += " V.idFlotilla.id = :idFlotilla AND";
        }
        if(tipoVehiculo != null){
            sql += " V.idTipo.id = :idTipo AND";
        }
        if(marcaVehiculo != null){
            sql += " V.idMarca.id = :idMarca AND";
        }
        if(fechaDesde != null){
            sql += " V.fechaCompra >= :fechaIni AND V.fechaCompra <= :fechaFin AND";
        }
        sql += " V.estado = 1 ORDER BY V.placa";
        Query q = em.createQuery(sql);
        if(flotilla != null){
            q.setParameter("idFlotilla", flotilla.getId());
        }
        if(tipoVehiculo != null){
            q.setParameter("idTipo", tipoVehiculo.getId());
        }
        if(marcaVehiculo != null){
            q.setParameter("idMarca", marcaVehiculo.getId());
        }
        if(fechaDesde != null && fechaHasta != null){
            sqlFechaIni = new java.sql.Date(fechaDesde.getTime());
            sqlFechaFin = new java.sql.Date(fechaHasta.getTime());
            q.setParameter("fechaIni", sqlFechaIni);
            q.setParameter("fechaFin", sqlFechaFin);
        }
        idsUnidades = q.getResultList();
        for(Integer id : idsUnidades){
            Query q1 = em.createQuery("SELECT C FROM ControlCambioNeumatico C "
                    + "WHERE C.idVehiculo.id = :id ORDER BY C.id DESC");
            q1.setParameter("id", id);
            q1.setMaxResults(1);
            List lst = q1.getResultList();
            if(!lst.isEmpty()){
                ControlCambioNeumatico control = (ControlCambioNeumatico)lst.get(0);
                lista.add(control);
            }
        }
        return lista;
    }
    
    private void btnImprimirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnImprimirActionPerformed
        // TODO add your handling code here:
        try {
            Flotillas flota = (Flotillas) cmbEmpresa.getSelectedItem();
            TiposVehiculo tipoVehiculo = (TiposVehiculo) cmbTipoUnidad.getSelectedItem();
            MarcasVehiculo marca = (MarcasVehiculo) cmbMarcas.getSelectedItem();
            Date fechaDesde = null, fechaHasta = null;
            if(checkFechaCompra.isSelected()){
                fechaDesde = dateDesde.getDate();
                fechaHasta = dateHasta.getDate();
            }
            NeumaticosPorUnidad repNXU = new NeumaticosPorUnidad();
            repNXU.setTipo(radBtnTodos.isSelected() ? 1 : 2);
            if(repNXU.getTipo() == 2) {
                repNXU.setFechaDesde(fechaDesde != null ? GUIUtil.convertirFechaDDMMYYY(fechaDesde) : "");
                repNXU.setFechaHasta(fechaHasta != null ? GUIUtil.convertirFechaDDMMYYY(fechaHasta) : "");
                repNXU.setMarcaUnidad(marca != null ? marca.getNombre() : "");
                repNXU.setTipoUnidad(tipoVehiculo != null ? tipoVehiculo.getNombre() : "");
                repNXU.setRazonSocial(flota != null ? flota.getNombre() : "");
            }
            List<ControlCambioNeumatico> cambios = this.getListaNeumaticos(flota, tipoVehiculo, marca, fechaDesde, fechaHasta);
            List<NeumaticosPorUnidadDetalle> detalles = new ArrayList<NeumaticosPorUnidadDetalle>();
            if(!cambios.isEmpty()) {
                for(ControlCambioNeumatico cambio : cambios) {
                    NeumaticosPorUnidadDetalle npu = new NeumaticosPorUnidadDetalle();
                    String codigoUnidad = (cambio.getIdVehiculo().getCodBarras() != null) ? cambio.getIdVehiculo().getCodBarras() : "";
                    npu.setCodigoV(codigoUnidad);
                    npu.setPlaca(cambio.getIdVehiculo().getPlaca());
                    List<DetalleControlCambioNeumatico> detalle = cambio.getDetalleControlCambioNeumaticoList();
                    Collections.sort(detalle);
                    List<String[]> neumaticos = new ArrayList<String[]>();
                    for(DetalleControlCambioNeumatico item : detalle) {
                        if(item.getTipo() >= 0){//Solo montajes yneutros
                            String[] dtlNeumaticos = new String[7];
                            dtlNeumaticos[0] = (item.getPosicion() <= 0) ? "R" : item.getPosicion() + "";
                            dtlNeumaticos[1] = item.getIdNeumatico().getCodigo();
                            dtlNeumaticos[2] = (item.getIdNeumatico().getIdMarca() == null) ? "" : item.getIdNeumatico().getIdMarca().getNombre();
                            dtlNeumaticos[3] = (item.getIdNeumatico().getIdModelo() == null) ? "" : item.getIdNeumatico().getIdModelo().getMedida();
                            dtlNeumaticos[4] = item.getIdNeumatico().getNumRenovaciones() + "";
                            Double alturaMinima = item.getIdNeumatico().getLabradoCentral();
                            if(alturaMinima != null && alturaMinima < item.getIdNeumatico().getLabradoExterior()){
                                alturaMinima = item.getIdNeumatico().getLabradoExterior();
                            }
                            if(alturaMinima != null && alturaMinima < item.getIdNeumatico().getLabradoInterno()){
                                alturaMinima = item.getIdNeumatico().getLabradoInterno();
                            }
                            alturaMinima = (alturaMinima != null && alturaMinima == 0) ? null : alturaMinima;
                            dtlNeumaticos[5] = (alturaMinima == null) ? "" : alturaMinima + "";
                            dtlNeumaticos[6] = item.getIdNeumatico().getIdEstadoMedicion().getNombre();
                            neumaticos.add(dtlNeumaticos);
                        }
                    }
                    npu.setDetalles(neumaticos);
                    detalles.add(npu);
                }
                repNXU.setListaNeumaticos(detalles);
                try {
                    Impresor impresor = new Impresor(repNXU);
                    Principal.getInstance().getEscritorio().add(impresor);
                    impresor.setVisible(true);
                    impresor.setMaximum(true);
                } catch (Exception e) {
                    e.printStackTrace();
                }
            } else {
                JOptionPane.showMessageDialog(this, "No se encontró datos para el reporte.", "Sin datos", JOptionPane.INFORMATION_MESSAGE);
            }
            
        } catch (Exception ex) {
            ex.printStackTrace();
        }
        
        /*final DialogoCargando dlg = new DialogoCargando(Principal.getInstance(), true);
        Thread hilo = new Thread() {

            @Override
            public void run() {
                Flotillas flota = (Flotillas) cmbEmpresa.getSelectedItem();
                TiposVehiculo tipoVehiculo = (TiposVehiculo) cmbTipoUnidad.getSelectedItem();
                MarcasVehiculo marca = (MarcasVehiculo) cmbMarcas.getSelectedItem();
                Date fechaDesde = null, fechaHasta = null;
                if(checkFechaCompra.isSelected()){
                    fechaDesde = dateDesde.getDate();
                    fechaHasta = dateHasta.getDate();
                }
                ReporteNeumaticosXUnidad reporte = new ReporteNeumaticosXUnidad();
                reporte.generarReporte(flota, tipoVehiculo, marca, fechaDesde, fechaHasta);
                dlg.dispose();
            }
        };
        hilo.start();
        dlg.setVisible(true);*/
    }//GEN-LAST:event_btnImprimirActionPerformed

    private void dateDesdePropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_dateDesdePropertyChange
        // TODO add your handling code here:
        if (evt.getPropertyName().compareTo("date") == 0) {
            dateHasta.setMinSelectableDate(dateDesde.getDate());
        }
    }//GEN-LAST:event_dateDesdePropertyChange

    private void radBtnTodosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_radBtnTodosActionPerformed
        // TODO add your handling code here:
        activarControles(!radBtnTodos.isSelected());
    }//GEN-LAST:event_radBtnTodosActionPerformed

    private void radBtnEspecificoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_radBtnEspecificoActionPerformed
        // TODO add your handling code here:
        activarControles(radBtnEspecifico.isSelected());
    }//GEN-LAST:event_radBtnEspecificoActionPerformed

    private void checkFechaCompraActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_checkFechaCompraActionPerformed
        // TODO add your handling code here:
        dateDesde.setEnabled(checkFechaCompra.isSelected());
        dateHasta.setEnabled(checkFechaCompra.isSelected());
    }//GEN-LAST:event_checkFechaCompraActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnImprimir;
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.JCheckBox checkFechaCompra;
    private javax.swing.JComboBox cmbEmpresa;
    private javax.swing.JComboBox cmbMarcas;
    private javax.swing.JComboBox cmbTipoUnidad;
    private com.toedter.calendar.JDateChooser dateDesde;
    private com.toedter.calendar.JDateChooser dateHasta;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JToolBar jToolBar1;
    private javax.swing.JRadioButton radBtnEspecifico;
    private javax.swing.JRadioButton radBtnTodos;
    // End of variables declaration//GEN-END:variables
}
